boolean displayed = false;

int x=100;
int y=300;

void setup() {
background(102);
size(500, 500);
noSmooth();
}

void draw() {
  if(keyPressed){
    if(keyCode == LEFT){
      x--;
    }
    if(keyPressed){
    if(keyCode == RIGHT){
      x++;
    }
   }
  }
   
  rect(x,y, 20,40);
  
strokeWeight(3);
rect(190, 200, 100, 100);
noStroke();
fill(0,77,153);
triangle(185,200,185,300,50,200);

noStroke();
fill(0,77,153);
triangle(295,200,295,300,430,200);

noStroke();
fill(255,204,0);
triangle(230,40,230,190,180,130);

noStroke();
fill(255,204,0);
triangle(235,60,235,190,300,140);

noStroke();
fill(125,193,0);
triangle(230,10,230,30,260,30);

stroke(153);
noFill();
ellipse(260,260,30,30);

stroke(153);
noFill();
ellipse(220,230,30,30);

stroke(126);
line(230,35,270,40);
line(230,40,250,45);
}
void mouseClicked(){
  background(102);
  if(!displayed){
     fill(255,204,0);
    ellipse(mouseX,mouseY,50, 50);
    displayed = true;
  }else{
    displayed = false;
  }
}
void mouseMoved(){
    if(displayed){
      background(102);
       fill(255,204,0);
      ellipse(mouseX,mouseY,50, 50);
    }
}
void keyTyped(){
  println("key="+key);
}
